package cn.pping.system.service.impl;

import cn.pping.basic.service.impl.BaseServiceImpl;

import cn.pping.system.domain.DictionaryDetail;
import cn.pping.system.mapper.DictionaryDetailMapper;
import cn.pping.system.service.IDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
// 只读事务
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class DictionaryServiceImpl extends BaseServiceImpl<DictionaryDetail> implements IDictionaryDetailService {

    @Autowired
    private DictionaryDetailMapper dictionaryMapper;


    @Override
    public void batch(List<Long> ids) {
        dictionaryMapper.batch(ids);
    }

    @Override
    public List<DictionaryDetail> findEmpl(Long id) {
        // 获取到前端的id查找后端的数据
        List<DictionaryDetail> employees = dictionaryMapper.loadByDeptId(id);
        System.out.println(employees);


        return employees ;
    }
}
